

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Survey Confirm</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/cssSurvey.css" type="text/css" />
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/validate.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/hanzenkaku.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/area.js"></script>
<script>
function onBack(){
    window.history.back();
}
function onClick(){
		/*var result = getErrors();
		alert(result);*/
	/*if ($('#ok:checked').val() ){
		//$('#formMain').submit();
		
	}else{
		alert('応募規約に同意して下さい。');
		return false;
		
	}*/
	//test_m();
	//alert(123123123);
	//getErrors();
	var errorList = getErrors('i_id1','i_id2','cource','i_contactNameFirst','i_contactNameSecond','i_contactNameFirstKana','i_contactNameSecondKana',
							'i_schoolName','i_schoolPosition','i_email','i_emailConf','i_zip1','i_zip2','i_setting_area2_id','i_cityName','i_townName',
							'i_tel1','i_tel2','i_tel3');
	var div = document.getElementById('errorMessage');	
	div.innerHTML = "";	
	if( errorList.count != 0){
	
	$('#errorMessage').css('display', 'block');
	
		div.innerHTML += 'エラーです、最初からやり直してください。'+'<br>';
		
		for(var i = 0 ; i < errorList.length; i ++ ){
			if(errorList[i].length > 1)
			{
				for(var j = 0 ; j < errorList[i].length; j ++ ){
					div.innerHTML += '●' + errorList[i][j]+ '<br>';
				}
			}
			else div.innerHTML +=  '●' + errorList[i] + '<br>';
		}
		//alert(errorList[0]);
		//document.getElementById('errorMessage').innerHTML = "adasdasdasd111111111111111111111111111";
	}
	//alert(str_error);
	
		//alert(result);

	//var check = detectZenKaku('４月');
	//alert(check);
	//var check = iskatakana("応募");
	//alert(check);
	
	//var check = checkEmail('binhck2@gmail.com');
	//alert(check);
	//var value = checkArea('i_setting_area2_id');
	//alert(value);
}

function onOKCheck(){


	if ($('#ok:checked').val() ){
		$('#oubo').css('display', 'block');
		$('#oubo_off').css('display', 'none');
	}else{
		$('#oubo_off').css('display', 'block');
		$('#oubo').css('display', 'none');
	}
}

</script>
<script>/*
    function checkValue(val1,val2){
        for(var i = 0; val2.length; i++){
            if(val2[i] == val1)
                return true;
        }
        return false;
    }
	$(document).ready(function(){
               // alert('abc');
		var valueabc = "<?php echo $q1 ?>";
                var cources  = document.getElementsByName('q1[]');
                var rdValue=0;
                for(var j = 0;j < valueabc.length; j++){
                    alert();
                }
                for (var i=0; i<cources.length; i++) {
                    var s = cources[i].value;
                    cources[i].disabled=true;
                    //alert(valueabc.indexOf(cources[i].toString()));
                    if(valueabc.indexOf(s) > -1){
                    
                        cources[i].checked = true;}
                        //}
                }
               
	});*/

</script>

<style type="text/css">
   (function ($) {
    "use strict";

    // Detecting IE
    var oldIE;
    if ($('html').is('.ie6, .ie7, .ie8')) {
        oldIE = true;
    }

    if (oldIE) {
        <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    } else {
        // ..And here's the full-fat code for everyone else
    }

}(jQuery));

</style>
</head>
<body >

	<div id="pagewrap">
<!--
		<div id="header">
			<img  src="<?php echo base_url(); ?>assets/image/Header_01.png" />
		</div>
-->
		<div id="content">
		<div class="titleSurvey">
		
			<?php if($id==1){?><img  src="<?php echo base_url(); ?>assets/image/title1.png" />
			<?php } else { ?> <img  src="<?php echo base_url(); ?>assets/image/title6.png" /><?php }?>
		</div>
					<form action="<?php echo site_url('addSurveyFormSubmission') .'?id='.$id; ?>" id="formMain">
						<!-- Row 1-->
					  <div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; font-style:bold; padding:10px;"><label class="lb3">応募ID(14ケタ)</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
                                                                <?php if(strlen($idsp1) > 0){?> 
								  1枚目: <?php echo $idsp1 ?> <br> <?php } ?>
                                                                 <?php if(strlen($idsp2) > 0){ ?> 
								  2枚目: <?php echo $idsp2 ?> <br> <?php } ?>
			
								</div>
							</div>
							
					<!-- Row 2-->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr >
											<th style="font-weight:900; padding:10px;" ><label class="lb3">ご希望のコースをお選びください</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
                                                            <table>
									<tbody>
                                                                <?php switch (intval($cources)){
                                                                    case 1:?>
                                                                                <tr>
											<td  style="padding-left:5px;"><img src="<?php echo base_url(); ?>assets/image/a.jpg" /></td>
										</tr>
										<tr>
											<td ><table><tbody><tr><td valign="top" width="15"><input name="cource" id="i_cource_0"  value="1" type="radio" checked ></td><td><label for="i_cource_0" class="lb5">A賞（応募ID2枚）<br>キムワイプオリジナル<br>BRUNOハイブリッド加湿器<br>フォルテミストwhite</td></tr></tbody></table></td>
										</tr>
                                                                        
                                                                     <?php break;
                                                                    case 2: ?> 
                                                                        
                                                                                <tr>
											<td  style="padding-left:5px;"><img src="<?php echo base_url(); ?>assets/image/b.jpg" /></td>
										</tr>
										<tr>
											<td ><table><tbody><tr><td valign="top" width="15"><input name="cource" id="i_cource_1"  value="2" type="radio" checked ></td><td><label for="i_cource_1" class="lb5"> B賞（応募ID2枚）<br>キムタオルオリジナル<br>タイガーポータブルクーラー<br>保温・保冷9.5L</td></tr></tbody></table></td>
										</tr>
                                                                        <?php break;
                                                                    case 3:?> 
                                                                                 <tr>
											<td  style="padding-left:5px;"><img src="<?php echo base_url(); ?>assets/image/c.jpg" /></td>
										</tr>
										<tr>
											<td ><table><tbody><tr><td valign="top" width="15"><input name="cource" id="i_cource_2"  value="3" type="radio" checked ></td><td><label for="i_cource_2"  class="lb5">C賞（応募ID1枚）<br>オリジナルマグカップ4個セット</td></tr></tbody></table></td>
										</tr>
                                                                        <?php break;
                                                                    default : ?> 
                                                                                <tr>
											<td  style="padding-left:5px;"><img src="<?php echo base_url(); ?>assets/image/d.jpg" /></td>
										</tr>
										<tr>
											<td width="50%"><table><tbody><tr><td valign="top" width="15"><input name="cource" id="i_cource_3"  value="4" type="radio" checked ></td><td><label for="i_cource_3"  class="lb5"> D賞（応募ID1枚）<br>オリジナルトランプ&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></tbody></table></td>
										</tr>
                                                                        <?php break;
                                                                }
                                                                ?>	
									</tbody>
								</table>

							</div>
							
							
					</div>
						
					<!-- ROW 3 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">勤務先(学校)ご住所<br>（全角文字で入力してください）</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/title2.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $workplace ?></div>
							</div>
					</div>
					
					<!-- ROW 4 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">部署名</label><br><label class="lb3">（学部・学科・研究室名)</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/title2.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $department ?></div>
							</div>
					</div>
					<!---ROW5-->
					 <div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">お名前</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1">姓 :<?php echo $name1 ?></div>
								   <div class="col1">名 :<?php echo $name2 ?> </div>
				
							</div>
					</div>
					
					<!-- ROW 6 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">フリガナ（全角）</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1">セイ :<?php echo $namekana1 ?></div>
								   <div class="col1"> メイ :<?php echo $namekana2 ?> </div>
				
							</div>
					</div>
				
					
					<!-- ROW 7 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">性別</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/title2.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"> <?php echo $sex;?>
								  
								  </div>
							</div>
					</div>
					
					<!-- ROW 7 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">メールアドレス</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $email; ?></div>
							</div>
					</div>
					<!-- ROW 8 -->
				
					<!-- ROW 9 -->
					<div class="row1">
						<label class="lb4">勤務先(学校)ご住所　　（全角文字でご入力ください。） </label>
					</div>
					
					<!-- ROW 10 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">郵便番号</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $zip ; ?></div>
								
							</div>
					</div>
					
					<!-- ROW 11 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">都道府県</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $areaStr; ?></div>
							</div>
					</div>
					
					<!-- ROW 12 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">市区郡</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $city; ?></div>
							</div>
					</div>
					
					<!-- ROW 13 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">町名等</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								  <div class="col1"><?php echo $town ; ?></div>
							</div>
					</div>
					
					<!-- ROW 14 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">電話番号</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									<!---ROW3-->
								 <?php echo $numphone; ?>
							</div>
					</div>
					
					<!-- ROW 15 -->
					<div class="row">
							<div  class="title">
								<table>
									<tbody>
										<tr>
											<th style="font-weight:900; padding:10px;"><label class="lb3">購入先をお教えください。</label></th>
											<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title2.png" ></th>
										</tr>
									</tbody>
								</table>
							</div>
							<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/title2.png" width="20" height="10"></img></label>-->
							<div class="fieldColumn" >
									
								  <div class="col1"> <?php echo $addressbuy; ?></div>
							</div>
					</div>
					<!-- ROW 16 -> 19 -->
					<?php
					if ($id==2) {
						include_once("confq2.inc");
					} else {
						include_once("confq1.inc");
					}	
					?>
					
					 <!-- ROW 20 -->
					 <div class="row">
						<div  class="title">
							<table>
								<tbody>
									<tr>
										<th style="font-weight:900; font-style:bold;padding:10px;"><label class="lb3">商品に対するご要望はございますか。</label></th>
										<th width="50"><img class ="td-icon" src="<?php echo base_url(); ?>assets/image/title4.png" ></th>
									</tr>
								</tbody>
							</table>
						</div>
						<!--<label class="desc" id="title1" for="Field1">応募ID(14ケタ)<img src="image/2_PC_キムタオル_入力_03.png" width="20" height="10"></img></label>-->
						<div class="fieldColumn" >
								<?php echo $q10; ?>
						</div>
					</div>
						<!-- ROW 21 -->
					<div style="margin-top:10px;">
							<div align="center" id="oubo">
                                                            <input type="image" src="<?php echo base_url(); ?>assets/image/titleconf1.png" alt="oubo_btn" width="124" height="40" onclick="onBack();return false;">&nbsp;
                                                            <a href="<?php echo site_url('addSurveyFormSubmission') ?>"><img src="<?php echo base_url(); ?>assets/image/titleconf2.png" alt="oubo_btn" width="120" height="40" ></a>
							</div>
					</div>
			</form>
				
		</div>
	</div>
	
	
</body>
</html>
